/*
 * @Author: zhuxiaoyi
 * @Date: 2021-10-28 12:40:36
 * @LastEditor: zhuxiaoyi
 * @LastEditTime: 2025-06-16 17:45:41
 * @Description:
 */
import service from "@/utils/request";
const geoserverBaseURL = "/geoserver/rest";
const backEndBaseURL = "/algorithmApi";

// const BASE_URL = "/zyjy-knowleges-api";
export default {
  login: {
    loginSystemURL: "/oauth/token",
    loginSystem: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postQuery(
        this.loginSystemURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  sldManage: {
    getStylesURL: "/workspaces/result/styles",
    getStyles: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        geoserverBaseURL + this.getStylesURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    getSldURL: "/workspaces/result/styles",
    getSld: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        geoserverBaseURL + this.getSldURL + "/" + params.name + ".sld",
        params,
        successCallBack,
        errorCallBack
      );
    },
    deleteSldURL: "/workspaces/result/styles",
    deleteSld: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteQuery(
        geoserverBaseURL + this.getSldURL + "/" + params.name,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  // 新增：测站数据要素管理接口
  stationTypeManage: {
    stationTypeURL: "/stationApi/station-type",
    
    // 分页查询测站类型
    getStationTypePage: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.stationTypeURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 查询所有测站类型
    getAllStationTypes: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL +this.stationTypeURL + "/all",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 根据ID查询测站类型
    getStationTypeById: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + +this.stationTypeURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 创建测站类型
    createStationType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL +this.stationTypeURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 更新测站类型
    updateStationType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL +this.stationTypeURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 删除测站类型
    deleteStationType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL +this.stationTypeURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 批量删除测站类型
    batchDeleteStationTypes: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL +this.stationTypeURL + "/batch",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 批量导入测站类型
    batchImportStationTypes: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL +this.stationTypeURL + "/batch-import",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 检查测站类型编码是否存在
    checkStationTypeCode: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL +this.stationTypeURL + "/check-code/" + params.code,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  
  // 新增：测站信息管理接口
  stationInfoManage: {
    stationInfoURL: "/stationApi/station-info",
    
    // 分页查询测站信息
    getStationInfoPage: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL +this.stationInfoURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 查询所有测站信息
    getAllStationInfo: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL +this.stationInfoURL + "/all",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 根据ID查询测站信息
    getStationInfoById: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL +this.stationInfoURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 根据测站编码查询
    getStationInfoByStcd: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL +this.stationInfoURL + "/by-stcd/" + params.stcd,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 根据地理位置范围查询测站
    getStationInfoByLocation: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL +this.stationInfoURL + "/by-location",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 创建测站信息
    createStationInfo: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL +this.stationInfoURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 更新测站信息
    updateStationInfo: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL +this.stationInfoURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 删除测站信息
    deleteStationInfo: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL +this.stationInfoURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 批量删除测站信息
    batchDeleteStationInfo: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL +this.stationInfoURL + "/batch",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 批量导入测站信息
    batchImportStationInfo: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL +this.stationInfoURL + "/batch-import",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 检查测站编码是否存在
    checkStationCode: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL +this.stationInfoURL + "/check-stcd/" + params.stcd,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  
// 更新后的监测数据管理接口
  monitoringDataManage: {
    monitoringDataURL: "/stationApi/monitoring-data",
    
    // 分页查询监测数据
    getMonitoringDataPage: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.monitoringDataURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 根据ID查询监测数据
    getMonitoringDataById: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.monitoringDataURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 根据测站编码查询监测数据
    getMonitoringDataByStation: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.monitoringDataURL + "/by-station/" + params.stationCode,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 新增：根据测站类型编码查询监测数据
    getMonitoringDataByStationType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.monitoringDataURL + "/by-station-type/" + params.stationTypeCode,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 根据时间范围查询监测数据（支持测站类型参数）
    getMonitoringDataByDateRange: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.monitoringDataURL + "/by-date-range",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 获取最新监测数据（支持测站类型参数）
    getLatestMonitoringData: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.monitoringDataURL + "/latest",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 创建监测数据
    createMonitoringData: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.monitoringDataURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 更新监测数据
    updateMonitoringData: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.monitoringDataURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 删除监测数据
    deleteMonitoringData: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.monitoringDataURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 批量删除监测数据
    batchDeleteMonitoringData: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.monitoringDataURL + "/batch",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 批量导入监测数据
    batchImportMonitoringData: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.monitoringDataURL + "/batch-import",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 获取数据统计信息（支持测站类型参数）
    getDataStatistics: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.monitoringDataURL + "/statistics/" + params.stationCode,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 新增：根据测站编码和数据类型获取数据统计
    getDataStatisticsByType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.monitoringDataURL + "/statistics-by-type/" + params.stationCode,
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 统计所有测站数据数量（已更新支持测站类型）
    countByStation: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.monitoringDataURL + "/count-by-station",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 新增：按测站类型统计数据
    countByStationType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.monitoringDataURL + "/count-by-station-type",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 清理过期数据
    deleteExpiredData: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteQuery(
        backEndBaseURL + this.monitoringDataURL + "/cleanup",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 新增：清理缓存
    clearCache: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.monitoringDataURL + "/clear-cache",
        params,
        successCallBack,
        errorCallBack
      );
    },
    
    // 新增：刷新缓存
    refreshCache: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.monitoringDataURL + "/refresh-cache",
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  algorithmManage: {
    AlgorithmsURL: "/algorithm",
    getAlgorithms: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.AlgorithmsURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    deleteAlgorithm: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.AlgorithmsURL + `/${params.id}`,
        params,
        successCallBack,
        errorCallBack
      );
    },
    getAlgorithmByIdURL: "/algorithm/getAlgorithmById",
    getAlgorithmById: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.getAlgorithmByIdURL + `/${params.id}`,
        params,
        successCallBack,
        errorCallBack
      );
    },
    updateAlgorithm: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.AlgorithmsURL + `/${params.id}`,
        params,
        successCallBack,
        errorCallBack
      );
    },
    addAlgorithmURL:"/algorithm/add",
    addAlgorithm: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.addAlgorithmURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    executeAlgorithm: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.AlgorithmsURL + `/${params.id}`,
        params,
        successCallBack,
        errorCallBack
      );
    },
    executeAlgorithmByIdURL:"/graph/executeGraphFromNode/",
    executeAlgorithmById: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.executeAlgorithmByIdURL + `${params.id}`,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  taskManage: {
    taskURL: "/task",
    getTasks: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.taskURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    deleteTask: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.taskURL + `/${params.id}`,
        params,
        successCallBack,
        errorCallBack
      );
    },
    getTreeTasksURL: "/task/tree",
    getTreeTasks: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.getTreeTasksURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    updateTaskStatusURL: "/task/changeStatus",
    updateTaskStatus: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.updateTaskStatusURL + `/${params.id}`,
        params,
        successCallBack,
        errorCallBack
      );
    },
    publishResultURL: "/task/publish",
    publishResult: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.publishResultURL + `/${params.id}`,
        params,
        successCallBack,
        errorCallBack
      );
    },
    pushResultURL: "/task/pushResult",
    pushResult: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.pushResultURL + `/${params.id}`,
        params,
        successCallBack,
        errorCallBack
      );
    },
    statusListenURL: "/task/statusListen",
    statusListen: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.statusListenURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  processListManage: {
    getprocessListURL: "/graph/getGraphs",
    getprocessList: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.getprocessListURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    getGraphsByTypeURL: "/graph/getGraphsByType/",
    getGraphsByType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.getGraphsByTypeURL + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    getProcessURL: "/graph/getGraph",
    getProcess: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.getProcessURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    getDynamicDataURL: "/graph/getDynamicData",
    getDynamicData: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.getDynamicDataURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    editDynamicDataURL: "/graph/editDynamicData",
    editDynamicData: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.editDynamicDataURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    addProcessURL: "/graph/addGraph",
    addProcess: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.addProcessURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    copyProcessURL: "/graph/copyGraph/",
    copyProcess: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.copyProcessURL + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    updateProcessURL: "/graph/updateGraph",
    updateProcess: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.updateProcessURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    deleteProcessURL: "/graph/deleteGraph",
    deleteProcess: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.deleteProcessURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    getAlgorithmParamsURL: "/graph/getNodeParams",
    getAlgorithmParams: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.getAlgorithmParamsURL + "/" + params.graphId,
        params,
        successCallBack,
        errorCallBack
      );
    },
    updateNodeParamsURL: "/graph/updateNodeParams",
    updateNodeParams: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.updateNodeParamsURL + "/" + params.graphId,
        params,
        successCallBack,
        errorCallBack
      );
    },
    executeGraphURL: "/graph/executeGraph",
    executeGraph: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.executeGraphURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    changePauseStatusURL: "/graph/changePauseStatus",
    changePauseStatus: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.changePauseStatusURL + "/" + params.graphId,
        params,
        successCallBack,
        errorCallBack
      );
    },
    changeParallelURL: "/graph/changeParallel",
    changeParallel: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.changeParallelURL + "/" + params.graphId,
        params,
        successCallBack,
        errorCallBack
      );
    },
    continueToExcuteURL: "/promise/trigger",
    continueToExcute: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.continueToExcuteURL + "/" + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  processTypeListManage: {
    processTypesURL: "/graphType/getAllGraphTypes",
    processTypes: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.processTypesURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    deleteTypeURL: "/graphType/deleteGraphType/",
    deleteType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.deleteTypeURL + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    addTypeURL: "/graphType/addGraphType",
    addType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.addTypeURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    editTypeURL: "/graphType/updateGraphType/",
    editType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.editTypeURL + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    batchAddGraphTypeURL: "/graphType/batchAddGraphType/",
    batchAddGraphType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.batchAddGraphTypeURL + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    removeGraphTypeURL: "/graphType/removeGraphType/",
    removeGraphType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.removeGraphTypeURL + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  module1Manage: {
    getPorductsURL: "/module1/getProducts",
    getPorducts: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.getPorductsURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  foldersManage: {
    getFoldersURL: "/folder/getLazyFolderContent",
    getFolders: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.getFoldersURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    getFilesURL: "/folder/fileList",
    getFiles: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.getFilesURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  AlgorithmTypeManage: {
    getTreeURL: "/algorithmType/getTree",
    getTree: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.getTreeURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    addTypeURL: "/algorithmType/addType",
    addType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.addTypeURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    updateTypeURL: "/algorithmType/updateType",
    updateType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.updateTypeURL,
        params,
        successCallBack,
        errorCallBack
      );
    },
    deleteTypeURL: "/algorithmType/deleteType/",
    deleteType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.deleteTypeURL + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
    updateAlgorithmsTypeURL: "/algorithmType/updateAlgorithmType/",
    updateAlgorithmsType: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.updateAlgorithmsTypeURL + params.id,
        params,
        successCallBack,
        errorCallBack
      );
    },
  },
  userManage:{
    userListURL: "/user",
    userList: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.userListURL,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
    addUserURL: "/user/register",
    addUser: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.post(
        backEndBaseURL + this.addUserURL,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
    updateUserURL: "/user",
    updateUser: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.updateUserURL+'/'+params.id,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
    deleteUserURL: "/user",
    deleteUser: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.deleteUserURL+'/'+params.id,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
  },
  auth:{
    loginURL: "/user/login",
    login: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.post(
        backEndBaseURL + this.loginURL,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
  },
  subsystemManage:{
    subsystemListURL: "/subsystem",
    subsystemList: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.subsystemListURL,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
    updateSubsystem: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.subsystemListURL+'/'+params.id,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
    addSubsystem: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.subsystemListURL,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
    deleteSubsystem: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.subsystemListURL+'/'+params.id,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
  },
  roleManage:{
    roleListURL: "/role",
    roleList: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        backEndBaseURL + this.roleListURL,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
    updateRole: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.putJson(
        backEndBaseURL + this.roleListURL+'/'+params.id,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
    addRole: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.postJson(
        backEndBaseURL + this.roleListURL,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
    deleteRole: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.deleteJson(
        backEndBaseURL + this.roleListURL+'/'+params.id,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
  },
  floodManage:{
    floodParamsURL: "/api/chart-info",
    floodParams: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        this.floodParamsURL,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
    floodCalcURL: "/api/result",
    floodCalc: function (
      params: any,
      successCallBack: Function,
      errorCallBack: Function
    ) {
      service.get(
        this.floodCalcURL,
        params,
        successCallBack,
        errorCallBack
      );
    }, 
  }
};